package es.xpt.ysf.commons.configuration.view;

import java.util.List;


import es.xpt.ysf.YSFException;
import es.xpt.ysf.commons.Names;
import es.xpt.ysf.commons.configuration.ConfigurationSession;
import es.xpt.ysf.commons.configuration.model.ParameterValue;
import es.xpt.ysf.view.LocalDelegate;
import es.xpt.ysf.view.model.UserBean;

 
/**
 * 
 * @author: Nacho Lapuerta
 * @version YSF 
 * @since 
 */

public class ConfigurationDelegate extends LocalDelegate<ConfigurationSession> {

  public ConfigurationDelegate(UserBean user) {
    super(user);
  }

  public List<ParameterValue> getParameters() throws YSFException {
	  ConfigurationSession ejb =connect(Names.CONFIGURATION);
	      return ejb.getParameters();  
}


  public ParameterValue updateConfiguration(String configuration, String value) throws YSFException {
	  ConfigurationSession ejb =connect(Names.CONFIGURATION);
      return ejb.updateParameter(configuration, value); 
  }
  
  
}
